@echo off

set ROOT_PATH=%CD%\..\..
set AUTO_CONF_FILE=%ROOT_PATH%\include\auto_config.h

ECHO #ifndef __AUTO_CONFIG_H__ > %AUTO_CONF_FILE%
ECHO #define __AUTO_CONFIG_H__ >> %AUTO_CONF_FILE%
ECHO. >> %AUTO_CONF_FILE%

git log -1 --pretty=format:"#define GIT_COMMIT_SHA1 \"%%H\"" >> %AUTO_CONF_FILE%
ECHO. >> %AUTO_CONF_FILE%
ECHO #define PROJECT "vulture_mdk" >> %AUTO_CONF_FILE%
ECHO. >> %AUTO_CONF_FILE%
ECHO #endif >> %AUTO_CONF_FILE%
ECHO. >> %AUTO_CONF_FILE%

exit
